package com.mz.ozy.mvp.model;

import android.content.Context;

import com.mz.ozy.constants.Constants;
import com.mz.ozy.net.RetrofitUtils;
import com.mz.ozy.utils.JsonUtils;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;

/**
 * Created by administrator on 2018/12/3.
 */
public class ModifyPwdModel {


    public Observable<ResponseBody> obtainModifyPwd(Context context, String pwdflag, String code, String newpwd) {
        Map<String, String> maps = new HashMap<>();
        maps.put("type", pwdflag);
        maps.put("code", code);
        maps.put("password", newpwd);
        return RetrofitUtils.getApiService(context).post(Constants.TransCode.TransCode10011, JsonUtils.requestJsonDate(maps), Constants.tokenId);
    }
    public Observable<ResponseBody> about(Context context) {

        return RetrofitUtils.getApiService(context).post(Constants.TransCode.TransCode10066, "", Constants.tokenId);
    }
    public Observable<ResponseBody> getCode(Context context, String mobilePhone) {
        Map<String, String> maps = new HashMap<>();
        maps.put("username", mobilePhone);
        maps.put("actionType", "U");
        return RetrofitUtils.getApiService(context).post(Constants.TransCode.TransCode10001, JsonUtils.requestJsonDate(maps), Constants.tokenId);
    }


}
